package calcwithio;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;

public class Excepts {

	public static int f(int i){
		return (100 - i )/i;
	}
	public static void main(String[] args) {
		final int start = -1, end = 5;
		
		Scanner input = null;
		PrintWriter pw = null;
		try {
			input = new Scanner(new FileInputStream("Ian.txt"));
			pw = new PrintWriter("Jake.txt");
			for (int i=start; i<end; i++){
				try {
					int in = input.nextInt();
					pw.println(" in is " + in + " and f(in) is " + f(in) );
				} catch (ArithmeticException ae){
				}
			}
		} catch (FileNotFoundException e1) {
			e1.printStackTrace();
		} finally {
			input.close();
			pw.close();			
		}
	}

}
